Technical Field
The present invention relates to a storage medium having a game program stored thereon, a game apparatus and an input device, and more particularly to a storage medium in which stored is a game program used for a computer game for which a pointing device such as a touch panel is employed, a game apparatus and an input device.
Description of the Background Art
Conventionally, various types of games for which a joystick is used as a controller have been developed. The joystick is provided with a lever, and a player tilts the lever forward and backward, and rightward and leftward, thereby making inputs according to the directions. In general, a direction in which and a degree to which the joystick is tilted are handled by a game apparatus as an input direction and an input quantity, respectively. In a case where the player tilts the joystick lever in a certain direction to a certain degree to hold the joystick lever at that position, the positional information is continuously outputted and handled by the game apparatus as the input direction and the input quantity. The joystick is also used for a typical personal computer as well as used as a controller for a home game apparatus.
On the other hand, an input device which is operated by a player using a touch panel has been also developed, as disclosed in, for example, Japanese Laid-Open Patent Publication No. 11-53115 (Document 1) and Japanese Laid-Open Patent Publication No. 7-182092 (Document 2) With the input device disclosed in the Document 1, as shown in FIG. 1 and FIG. 3 of the Document 1, a player uses a touch panel to utilize, as a direction in which and a speed at which a cursor moves, a direction and a distance from a predetermined origin on the touch panel to a point at which the player is pointing. On the other hand, in the input device disclosed in the Document 2, as shown in FIG. 6 of the Document 2, a game screen is displayed on a display having a touch panel mounted thereon. According to a movement corresponding to a vector quantity of a movement of a finger with which a player touches the touch panel, an object which is selectively touched is moved on the game screen.
Here, if an operation in which a joystick is emulated can be realized for a game apparatus having a touch panel, it is convenient. In this case, information which is eventually required is a vector value of two axes of X and Y corresponding to a joystick input value. The vector value is represented as a vector value (sx, sy) in a stick coordinate system. A direction indicated by the vector value (sx, sy) is a direction in which the joystick is tilted and a length of the vector value is a degree to which the joystick is tilted. Further, the length of the vector value corresponding to the joystick being tilted to the maximum is set as “1”. In this case, sx=−1 to +1 and sy=−1 to +1, and the length of “0” indicates that the joystick is in a neutral (upright) position.
Further, the vector value (sx, sy) in the stick coordinate system can be obtained according to the following formula, using an origin (ox, oy) on the touch panel and a point (tx, ty) at which the player is pressing the touch panel, the origin and the point being represented in the touch panel coordinate system.sx=(tx−ox)×ratiosy=(ty−oy)×ratiowhere the ratio is a conversion ratio used for defining a length in the touch panel coordinate system, which corresponds to the length “1” in the stick coordinate system. For example, when a length from an origin is “10” in the touch panel coordinate system, the length is defined as “1” in the stick coordinate system. Consequently, the ratio is set as “ratio=1÷10=0.1”.
While the invention disclosed in the Document 1 utilizes, for information processing, a difference between an origin and a point at which a touch panel is being pressed, when the input method of the invention disclosed in the Document 1 is applied as it is to the operation in which a joystick is emulated, various problems arise.
In the case of an actual joystick, the player keeps the lever tilted at a desired angle in a desired direction, thereby continuously outputting an input value according to the direction and the angle. That is, the joystick continuously supplies a constant output when the lever is held at a predetermined position. In a case where such operation is applied to the invention disclosed in the Document 1, an angle and a distance between an center point (origin) being set at the center of the touch panel and an input point at which the player presses the touch panel are used as an input value for the operation in which a joystick is emulated. Therefore, since the origin used for the operation in which a joystick is emulated is fixedly set as the center point of the touch panel, when the player touch-operates the touch panel, the player must constantly confirm the position of the origin being set on the touch panel so as to perform a correct operation. In the case of an actual joystick, since the player can perceive how the lever is being tilted with his finger or hand, the player does not have to visually confirm the origin of the joystick. However, in a case where an operation in which a joystick is emulated using a touch panel is realized, since the player cannot perceive the origin with his finger, the player must visually confirm the position of the origin.
A method for relatively moving a cursor according to a movement trace of a player's finger is also disclosed in the Document 1. Further, a method for moving an object which is selectively touched on a game screen according to a movement corresponding to a vector of a movement of a finger with which a player touches a touch panel is disclosed in the Document 2. In these methods, however, since the input is not made until the players' finger moves, the input for which a joystick is emulated cannot be realized. This is because an actual joystick continuously supplies a constant input when a lever is held at a predetermined position as described above. More specifically, in a case where a game object is moved according to a movement corresponding to a vector of a movement of a finger which touches the touch panel in the method disclosed in the Document 2, the finger must be continuously moved in order to move the game object.
Therefore, an object of the present invention is to provide a storage medium having stored thereon a game program for preventing, in an operation in which a joystick is emulated using a pointing device, a player from being confused during the operation, a game apparatus, and an input device.
The present invention has the following features to attain the object mentioned above. The reference numerals, step Nos. (a step is abbreviated as S and only the step Nos. are indicated), and the like in the parentheses indicate the correspondence with the embodiment described below in order to aid in understanding the present invention and are not intended to limit, in any way, the scope of the present invention.
A first aspect of the present invention is directed to a storage medium having stored thereon a game program executed by a computer (21) in a game apparatus (1) which is operated using a pointing device (13). The pointing device outputs coordinate information (tx, ty) being based on a given coordinate system (touch panel coordinate system) and being designated according to an operation of a player. The game program stored on the storage medium causes the computer operable to execute a reference coordinate setting step (S43), a designated coordinate setting step (S44), and a game control step (S48, S52, and S53). In the reference coordinate setting step, reference coordinates (ox, oy) for controlling the game in the coordinate system is set based on coordinate information which is outputted when a state that no coordinate information is outputted from the pointing device is shifted to a state that coordinate information is outputted. In the designated coordinate setting step, designated coordinates (ux, uy) in the coordinate system is set based on the coordinate information which is outputted from the pointing device. In the game control step, the game is controlled based on at least one (sx, sy) of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates. The pointing device is an input device for designating an input position or coordinates on a screen, such as a touch panel, a mouse, a track pad, and a track ball. The coordinate system used for each input device is a touch panel coordinate system or a screen coordinate system.
In a second aspect based on the first aspect, in the reference coordinate setting step, when the player carries out a continuous operation using the pointing device, the reference coordinates are set in the coordinate system based on the earliest coordinate information which is designated by the player.
In a third aspect based on the first aspect, the game program stored on the storage medium further causes the computer operable to execute an output detection step (S40, S42, and S49 to S51). In the output detection step, it is detected that a state that the player is operating the pointing device is shifted to a non-operation state (S50) according to whether coordinate information is outputted from the pointing device or not (S40). In the reference coordinate setting step, the reference coordinates are reset in the coordinate system based on coordinate information which is outputted when a state that no coordinate information is outputted from the pointing device is shifted again to a state that the coordinate information is outputted (Yes in both S40 and S42) after the non-operation state is detected in the output detection step (a touch flag is set as OFF in S51).
In a fourth aspect based on the third aspect, in the output detection step, when the state that the coordinate information is outputted from the pointing device is shifted to the state that no coordinate information is outputted, counting a time period during which the non-output state is continued is started (S49), and when the time period being counted exceeds a predetermined time period (Yes in S50), it is determined that a state that the player is operating the pointing device is shifted to a non-operation state (S51).
In a fifth aspect based on the first aspect, in the game control step, when an output of coordinate information from the pointing device is stopped, the game is continuously controlled based on at least one of the input direction and the input distance between the designated coordinates and the reference coordinates which are set before the output is stopped.
In a sixth aspect based on the first aspect, the game program stored on the storage medium further causes the computer operable to execute a positional relationship storage step. In the positional relationship storage step, when the output of coordinate information from the pointing device is stopped, stored is a relative positional relationship between the designated coordinates and the reference coordinates, which are set before the output is stopped. In the designated coordinate setting step, a position indicated by the earliest coordinate information which is outputted from the pointing device after the output is stopped is set as the designated coordinates in the coordinate system. In the reference coordinate setting step, the reference coordinates are reset in the coordinate system based on the relative positional relationship having been stored in the positional relationship storage step using as a reference the position indicated by the earliest coordinate information.
In a seventh aspect based on the first aspect, the game apparatus comprises a display (12) which is covered by the pointing device. The game program stored on the storage medium further causes the computer operable to execute a reference coordinate position display step. In the reference coordinate position display step, an image indicating the position of the reference coordinates is displayed on the display.
An eighth aspect of the present invention is directed to a game apparatus which is operated using a pointing device. The pointing device outputs coordinate information being based on a given coordinate system and being designated according to an operation of a player. The game apparatus comprises a reference coordinate setting means, a designated coordinate setting means and a game control means. The reference coordinate setting means sets reference coordinates for controlling the game in the coordinate system, based on the coordinate information which is outputted when a state that no coordinate information is outputted from the pointing device is shifted to a state that coordinate information is outputted. The designated coordinate setting means sets designated coordinates in the coordinate system based on the coordinate information which is outputted from the pointing device. The game control means controls the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates.
A ninth aspect of the present invention is directed to an input device for inputting information to the game apparatus according to an operation of a player. The input device comprises a coordinate information output means (13), a reference coordinate setting means, and a designated coordinate setting means. The coordinate information output means outputs coordinate information being based on a given coordinate system and being designated according to the operation of the player. The reference coordinate setting means sets reference coordinates for controlling the game in the coordinate system, based on coordinate information which is outputted when a state that no coordinate information is outputted from the coordinate information output means is shifted to a state that the coordinate information is outputted. The designated coordinate setting means sets designated coordinates in the coordinate system based on the coordinate information which is outputted from the coordinate information output means. The game apparatus controls the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates.
A tenth aspect of the present invention is directed to a storage medium having stored thereon a program executed by a computer in an information processing apparatus (1) which is operated using a pointing device. The pointing device outputs coordinate information being based on a given coordinate system and being designated according to an operation of a user. The program stored on the storage medium causes the computer operable to execute a reference coordinate setting step, a designated coordinate setting step, and an operation processing step. In the reference coordinate setting step, reference coordinates for performing operation processing in the coordinate system is set based on the coordinate information which is outputted when a state that no coordinate information is outputted from the pointing device is shifted to a state that the coordinate information is outputted. In the designated coordinate setting step, designated coordinates in the coordinate system is set based on the coordinate information which is outputted from the pointing device. In the operation processing step, operation processing is performed based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates.
According to the first aspect, when an operation in which a joystick is emulated is carried out with using reference coordinates and designated coordinates which are set by a pointing device, the reference coordinates which are fixedly set through a continuous operation is set based on coordinate information which is outputted when a state that no coordinate information is outputted from the pointing device is shifted to a state that the coordinate information is outputted. Therefore, the player operates the pointing device by himself, and thereby the player can controllably feel and know the position of the reference coordinates having been set by himself. That is, the player can recognize the reference coordinates as if he controls a joystick, and thereby it is unnecessary to visually confirm the position of the reference coordinates. Further, reference coordinates which are always fixed with respect to the pointing device is not set, and thereby the operation can be started at any position in the coordinate system for the pointing device.
According to the second aspect, the reference coordinates are set based on the earliest coordinate information which is designated during a continuous operation carried out by the player using the pointing device, and thereby the player can easily and controllably set the reference coordinates during the operation and naturally know the position of the reference coordinates.
According to the third aspect, the player can easily reset the reference coordinates.
According to the fourth aspect, even when the operation on the pointing device is interrupted against the player's intention, the player can continue the game feeling as if no interruption has occurred.
According to the fifth aspect, the player does not have to continue the same operation for a long time, and thereby the same operation can be easily continued.
According to the sixth aspect, since a relative positional relationship between the reference coordinates and the designated coordinates is maintained, even when the operation is interrupted against the player's intention, the player can continue the game feeling as if no interruption has occurred.
According to the seventh aspect, an image indicating the position of the reference coordinates is displayed on a display, and thereby the reference position can be further displayed to the player in real time.
Moreover, the game apparatus, the input device and the storage medium having a program stored thereon according to the present invention enables the same effect as that obtained by the aforementioned game program to be achieved.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.